package ModelLayer;
/**
 * Employee class holds information about employees. Inherits variables from superclass Person.
 * 
 * @author Anna K., Anders A.P., Danny M.P., Jakob K., Mie P.  
 * @version 1.0 
 */
public class Employee extends Person {

    private int         employeeNo;
    private static int  counter = 0;
    private String      password;
    
    /**
     * Constructs an instance of Employee, taking the following parameters: 
     * 
     * @param   name        name of the employee.
     * @param   address     address of the employee.
     * @param   email       e-mail address of the employee.
     * @param   tlf         telephone number of the employee.
     * @param   employeeNo  identification number of the employee.
     */
    public Employee(String name, String address, String email, String tlf, String password) {

        super(name, address, email, tlf);
        ++counter;
        this.employeeNo = counter;
        this.password = password;

    }

    /**
     * Returns the employee number of an Employee object.
     * 
     * @return  employeeNo  the id number of the employee.
     */
    public int getEmployeeNo() {

        return employeeNo;

    }
    
    /**
     * Returns the value of the password.
     * 
     * @return password     the password as a String object. 
     */
    public String getPassword() {

        return password;

    }
    
    /**
     * Sets a new value for the password field, replacing the previously employee password:
     * 
     * @param   password    new employee password as a String object
     */
    public void setPassword(String password) {

        this.password = password;

    }

}